#include <iostream>
using namespace std;

#define MAXTOKEN 512

struct Line
{
	struct Line *nextPart;
	struct Line *previousPart;
	struct Line *nextLine;
	struct Line *previousLine;
	char line[MAXTOKEN];
	int usage;
};

class FileReader
{
public:
	FileReader(FILE *f)
	{
		fp = f;
		main = new struct Line;
		memset(main,0,sizeof(Line));
		firstLine = lastLine = currentLine = main;
	}

	void ReadLine();
	

private:
	FILE *fp;
	struct Line *main;
	struct Line *firstLine;
	struct Line *currentLine;
	struct Line *lastLine;
};